from django.conf.urls.defaults import *
from django.contrib.auth.decorators import login_required
from books import views

urlpatterns= patterns('',
   url(r'^add_book/$', 
       login_required(views.add), 
       name ='book_add'
   ),
   url(r'^update_book/(?P<book_id>\d+)/(?P<dontvalidate>\w+)/$', 
       login_required(views.update), 
       name ='book_update'
   ),
   url(r'^update_note/(?P<note_id>\d+)/(?P<dontvalidate>\w+)$', 
       login_required(views.update_note), 
       name ='book_upnote'
   ),
   url(r'^add_booknote/(?P<book_id>\d+)/(?P<dontvalidate>\w+)$', 
       login_required(views.add_note), 
       name ='book_addnote'
   ),
)
